package design_pattern.singleton;

/**
 * Created by WeiDingKuo on 2017/10/26 9:44
 */
public class Test {
    public static void main(String[] args) {
        Singleton1 s1 = Singleton1.getInstance();
        Singleton1 s2 = Singleton1.getInstance();
        System.out.println(s1 == s2);

        Singleton2 s3 = Singleton2.instance;
        Singleton2 s4 = Singleton2.instance;
        System.out.println(s3 == s4);
    }
}
